<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<div class="hot-books">
<h3>热卖图书</h3>
               <ul>
               </ul>
</div>
<script type="text/javascript">
$(function(){
//热门图书
request("listBook.do","pageIndex=0&pageSize=4&isNotPage=1&isHot=1",function(data){
		var d = data.data;
		for(var i in d){
		    var row = $('<li><a target="_blank" class="book-img"><img/></a><div class="price"></div><div class="hot-name"><a target="_blank"></a></div></li>')
            var book = d[i];
            row.find(".book-img").attr("href","bookdetail.do?id="+book.id);
            row.find(".book-img img").attr("src",getImg(book['img']));
            row.find(".hot-name a").text(book.name);
            row.find(".hot-name a").attr("href","bookdetail.do?id="+book.id);
            row.find(".price").text("￥"+book.priceSelling);
            $(".hot-books ul").append(row);
		}
	});

})
</script>